<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body style="margin:0 auto;text-align:center">
	<a href="${ctx}/user/add">新增</a>
	<table border="1" cellspacing="0" style="margin:0 auto;text-align:center">
		<thead>
			<tr>
				<td>序号</td>
				<td>ID</td>
				<td>用户名</td>
				<td>密码</td>
				<td>年龄</td>
				<td>修改</td>
				<td>删除</td>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="obj" items="${list}" varStatus="vs">
				<tr>
					<td>${vs.index + 1}</td>
					<td>${obj.id}</td>
					<td>${obj.username}</td>
					<td>${obj.password}</td>
					<td>${obj.age}</td>
					<td><a href="${ctx}/user/edit/${obj.id}">修改</a></td>
					<td><a href="${ctx}/user/${obj.id}">删除</a></td>
					
				</tr>
			</c:forEach>
		</tbody>
	</table>
</body>
<script type="text/javascript" src="${ctx}/static/js/jquery.min.js"></script>
<script type="text/javascript">
	$(function(){
		$("#del").click(){
			alert(445);
			var msg= "您确定删除？";
			if(confirm(msg)==true){
				return true;
			}else{
				return false;
			}
		}
	})
</script>
</html>